<?php include "conn.php";?>
<?
$Menu_table="newscata_shop";
$Menu_OpenLink = "html.php";
$id=intval($_REQUEST["id"]);
if($id=="" || !is_numeric($id)){
    OutErrorBack("Error, please return!");
}else{
    $Type1=Request_table("type","news_shop",$id);
    $News_title=Request_table("title","news_shop",$id);
}
$conn = new Mysql();
$sql="select id,title,content,adate,author,Linkcount,ArticleTitle,ArticleKeyword,ArticleDescribes from news_shop where id = '$id'";
$rs =$conn->getRow($sql);
if($rs)
{
    $conn->query("update news_shop set Linkcount = Linkcount + 1 where id = '$id'");
    $title = $rs["title"];
    $content = $rs["content"];
    $adate = $rs["adate"];
    $author = $rs["author"];
    $Linkcount = $rs["Linkcount"]+1;
    $SiteTitle=$title."_".$rs["ArticleTitle"];
    $SiteDescription=$rs["ArticleKeyword"];
    $SiteKeywords=$rs["ArticleDescribes"];

}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><?php echo $SiteTitle;?></title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="keywords" content="<?php echo $SiteKeywords;?> ">
    <meta name="description" content="<?php echo $SiteDescription;?> " />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <?php include "public/cssjs.php";?>
    <link rel="stylesheet" type="text/css" href="css/news-page.css" />
</head>
<body>
<?php include "public/top.php";?>
<!--  -->
<div class="main-page">
    <div class="container">
        <div class="row">
            <div class="col-md-4">
                <div class="home-m home-someProducts">
                    <div class="home-body">
                        <div class="row">
                            <?php
                            $connp=new Mysql();
                            $sql="select * from products where is_hot=1 order by px desc limit 8";
                            $row=$connp->getAll($sql);
                            foreach($row as $k3=>$rsp) {
                            ?>
                                <div class="col-sm-6 col-md-12">
                                    <div class="home-someProducts-item mb-4">
                                        <div class="label"><strong><?php echo $rsp["objects"];?></strong></div>
                                        <div class="home-someProducts-img"><a href="#"><img class="hvr-grow"src="/pic/<?php echo $rsp["pic"];?>" alt="<?php echo $rsp["title"];?>"></a>
                                            <div class="home-someProducts-action"><a href="#">加入购物车 <i class="iconfont icon-gouwuche"></i></a></div>
                                        </div>
                                        <div class="home-someProducts-caption">
                                            <div class="home-someProducts-title"><?php echo $rsp["title"];?></div>
                                            <div class="home-someProducts-rating"><?php echo $rsp["styles"];?></div>
                                            <div class="home-someProducts-price"><small>¥<?php echo $rsp["ys_s_price"];?></small>¥<?php echo $rsp["ys_e_price"];?></div>
                                        </div>
                                    </div>
                                </div>


                                <?php
                            }
                            ?>



                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-8">

                <article class="article">
                    <h1 class="article-title"><?php echo $title;?></h1>
                    <p class="article-meta"><?php echo $author;?> <?php echo date("Y-m-d",strtotime($adate));?></p>
                    <div class="article-body">
                       <?php echo $content;?>
                    </div>
                </article>
            </div>
        </div>
    </div>
</div>
<!--  -->



<?php include "public/footer.php";?>
<?php include "public/bottom.php";?>
</body>

</html>